/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.lsp.lsp.violation.impl;

import za.ac.cput.lsp.lsp.violation.impl.DriverImpl;

/**
 *
 * @author 210227257
 */
public class DriverOverTimeImpl extends DriverImpl{
    private final static int overtimeRate = 190;
    private int overtimeHours;
 
    public DriverOverTimeImpl(String name, String surname, int hoursWorked, int overtimeHoursWorked){
        super(name, surname, hoursWorked);  
        overtimeHours = overtimeHoursWorked;
    }
    
    @Override
    public double salary(){
        return super.salary() + overtimeRate * overtimeHours;
    }
}
